export type ITypeName<T> = T extends string
  ? 'string'
  : T extends number
  ? 'number'
  : T extends boolean
  ? 'boolean'
  : T extends undefined
  ? 'undefined'
  : T extends Function
  ? 'function'
  : 'object';

export type IsString<T> = T extends string ? true : false;

export type IFunctionPropertyNames<T> = {
  [K in keyof T]: T[K] extends Function ? K : never;
}[keyof T];

export type IFunctionProperties<T> = Pick<T, IFunctionPropertyNames<T>>;

export type INonFunctionPropertyNames<T> = {
  [K in keyof T]: T[K] extends Function ? never : K;
}[keyof T];

export type INonFunctionProperties<T> = Pick<T, INonFunctionPropertyNames<T>>;

export declare type IDictionary<T> = {
  [key: string]: T;
};

export declare type IArrayLike<T> = {
  [key: number]: T;
  length: number;
};

export type IFn = {
  (...rest: any): void;
};
